﻿@model FollowPeers.Models.Course

@{
    ViewBag.Title = "Create New Course";
    FollowPeers.Models.FollowPeersDBEntities followPeersDB = new FollowPeers.Models.FollowPeersDBEntities();
    string name = Membership.GetUser().UserName;
    FollowPeers.Models.UserProfile myprofile = followPeersDB.UserProfiles.SingleOrDefault(p => p.UserName == name);
}

@Html.Partial("_Header")

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
        <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
        <script src=@Url.Content("~/Scripts/jquery.bgiframe.js") type="text/javascript"></script>
        <script src=@Url.Content("~/Scripts/jquery.mcdropdown.js") type="text/javascript"></script>
        <link rel="stylesheet" type="text/css" href="../../Content/css/jquery.mcdropdown.css" />

@Html.Partial("_SideBar1")
<div class="grid_9">
    <div class="box">
        <h2>Create Course</h2>
        @using (Html.BeginForm()) {
            @Html.ValidationSummary(true)
            <fieldset>
                <legend>Course</legend>
                <div class="editor-label">
                    @Html.LabelFor(model => model.CourseName)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.CourseName)
                    @Html.ValidationMessageFor(model => model.CourseName)
                </div>

                <div class="editor-label">
                    @Html.LabelFor(model => model.PhotoUrl)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.PhotoUrl)
                    @Html.ValidationMessageFor(model => model.PhotoUrl)
                </div>

                <div class="editor-label">
                    @Html.LabelFor(model => model.CourseDescription)
                </div>
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.CourseDescription)
                    @Html.ValidationMessageFor(model => model.CourseDescription)
                </div>

                <div class="editor-label">
                    @Html.LabelFor(model => model.StartDate)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.StartDate)
                    @Html.ValidationMessageFor(model => model.StartDate)
                </div>

                <div class="editor-label">
                    @Html.LabelFor(model => model.EndDate)
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.EndDate)
                    @Html.ValidationMessageFor(model => model.EndDate)
                </div>
                <input type="submit" value="Create" />
            </fieldset>
            
        }

        <div>
            @Html.ActionLink("Back to my Courses", "Mine","Course")
        </div>
    </div>
</div>

@Html.Partial("_Footer")